package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;
import java.util.List;
@TableName("t_email")

public class EmailBean {
    @TableId(value = "pk_emailId",type = IdType.AUTO)
    private Integer id;
    @TableField("e_theme")
    private String theme;
    @TableField("e_content")
    private String content;
    @TableField("e_path")
    private String path;
    @TableField("e_sendDate")
    private LocalDate sendDate= LocalDate.now();
    @TableField("e_delStatus")
    private String isDel="未删除";

    @TableField("fk_authorId")
    private Integer authorId; //发件人对象Id

    @TableField(exist = false)
    private String authorName;

    @TableField("e_receivers")
    private String accepters; //收件人

    public EmailBean() {
    }

    public EmailBean(Integer id, String theme, String content, String path, LocalDate sendDate, Integer authorId, String accepters) {
        this.id = id;
        this.theme = theme;
        this.content = content;
        this.path = path;
        this.sendDate = sendDate;
        this.authorId = authorId;
        this.accepters = accepters;
    }

    public EmailBean(String theme, String content, String path, LocalDate sendDate, Integer author, String accepters) {
        this.theme = theme;
        this.content = content;
        this.path = path;
        this.sendDate = sendDate;
        this.authorId = author;
        this.accepters = accepters;
    }

    public EmailBean(String theme, String content, String path, LocalDate sendDate) {
        this.theme = theme;
        this.content = content;
        this.path = path;
        this.sendDate = sendDate;
    }

    public EmailBean(String theme, String content, Integer author,String path) {
        this.theme = theme;
        this.content = content;
        this.authorId=author;
        this.path = path;
    }

    public EmailBean(Integer id, Integer authorId) {
        this.id = id;
        this.authorId = authorId;
    }

    public Integer getAuthorId() {
        return authorId;
    }

    public void setAuthorId(Integer authorId) {
        this.authorId = authorId;
    }

    public String getAuthorName() {
        return authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTheme() {
        return theme;
    }

    public void setTheme(String theme) {
        this.theme = theme;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public LocalDate getSendDate() {
        return sendDate;
    }

    public void setSendDate(LocalDate sendDate) {
        this.sendDate = sendDate;
    }

    public Integer getAuthor() {
        return authorId;
    }

    public void setAuthor(Integer author) {
        this.authorId = author;
    }

    public String getAccepters() {
        return accepters;
    }

    public void setAccepters(String accepters) {
        this.accepters = accepters;
    }

    public String getIsDel() {
        return isDel;
    }

    public void setIsDel(String isDel) {
        this.isDel = isDel;
    }

    @Override
    public String toString() {
        return "EmailBean{" +
                "id=" + id +
                ", theme='" + theme + '\'' +
                ", content='" + content + '\'' +
                ", path='" + path + '\'' +
                ", sendDate=" + sendDate +
                ", isDel='" + isDel + '\'' +
                ", authorId=" + authorId +
                ", authorName='" + authorName + '\'' +
                ", accepters='" + accepters + '\'' +
                "}\n";
    }
}
